﻿#include "secsenum.h"


QString SecsEnum::getStrCommunicationState(CommunicationState communicationState)
{
    QMetaEnum metaEnum = QMetaEnum::fromType<CommunicationState>();
    return QString(metaEnum.valueToKey(communicationState));
}

QString SecsEnum::getStrConnectionState(ConnectionState connectionState)
{
    QMetaEnum metaEnum = QMetaEnum::fromType<ConnectionState>();
    return QString(metaEnum.valueToKey(connectionState));
}

QString SecsEnum::getStrConnectMode(ConnectMode connectMode)
{
    QMetaEnum metaEnum = QMetaEnum::fromType<ConnectMode>();
    return QString(metaEnum.valueToKey(connectMode));
}

QString SecsEnum::getStrControlState(ControlState controlState)
{
    QMetaEnum metaEnum = QMetaEnum::fromType<ControlState>();
    return QString(metaEnum.valueToKey(controlState));
}

QString SecsEnum::getStrFormate(Formate formate)
{
    QMetaEnum metaEnum = QMetaEnum::fromType<Formate>();
    return QString(metaEnum.valueToKey(formate));
}

QString SecsEnum::getStrFormateLength(FormateLength formateLength)
{
    QMetaEnum metaEnum = QMetaEnum::fromType<FormateLength>();
    return QString(metaEnum.valueToKey(formateLength));
}

QString SecsEnum::getStrPType(PType pType)
{
    QMetaEnum metaEnum = QMetaEnum::fromType<PType>();
    return QString(metaEnum.valueToKey(pType));
}

QString SecsEnum::getStrSType(SType sType)
{
    QMetaEnum metaEnum = QMetaEnum::fromType<SType>();
    return QString(metaEnum.valueToKey(sType));
}

QString SecsEnum::getStrSelectStatus(SelectStatus selectStatus)
{
    QMetaEnum metaEnum = QMetaEnum::fromType<SelectStatus>();
    return QString(metaEnum.valueToKey(selectStatus));
}

QString SecsEnum::getStrDeselectStatus(DeselectStatus deselectStatus)
{
    QMetaEnum metaEnum = QMetaEnum::fromType<DeselectStatus>();
    return QString(metaEnum.valueToKey(deselectStatus));
}

QString SecsEnum::getRejectReasonCode(RejectReasonCode rejectReasonCode)
{
    QMetaEnum metaEnum = QMetaEnum::fromType<RejectReasonCode>();
    return QString(metaEnum.valueToKey(rejectReasonCode));
}
